تابع ووکامرسی wc_get_account_endpoint_url دریافت آدرس Api حساب کاربری

تابع ووکامرسی wc_get_account_endpoint_url دریافت آدرس Api حساب کاربری

تابع ووکامرسی wc_get_account_endpoint_url – دریافت آدرس Api حساب کاربری

Syntax – سینتکس

(string) wc_get_account_endpoint_url( (string) $endpoint ); 

Parameters – پارامتر ها (1)

  • 1- $endpoint (string)

Usage – نحوه استفاده

if ( !function_exists( 'wc_get_account_endpoint_url' ) ) { 
    require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-account-functions.php'; 
} 
  
// The endpoint. 
$endpoint = ''; 
  
// NOTICE! Understand what this does before running. 
$result = wc_get_account_endpoint_url($endpoint); 
    

Defined – محل تعریف

/includes/wc-account-functions.php

function wc_get_account_endpoint_url( $endpoint ) { 
    if ( 'dashboard' === $endpoint ) { 
        return wc_get_page_permalink( 'myaccount' ); 
    } 
 
    return wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' ) ); 
} 

versions – نسخه ها

از نسخه : 2.6.0

نسخه فعلی : 3.0.6

دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2

ارسال نظر

جهت استفاده از کد حتما از تگ pre استفاده نمایید .

contact us