[英]Missing argument 3 error how can I fix this
我有
警告:第39行的/home/content/01/11974901/html/wp-content/plugins/woc-open-close/includes/classes/class-functions.php中的wooopenclose :: replace_product_link()缺少參數3
我的第39行如下所示:
function replace_product_link( $link_html, $product, $args ){
return $link_html;
}
怎么了
始終將可選參數列為具有默認值的最后一個參數。 由於PHP沒有命名參數,也沒有“重載ala Java”,所以這是唯一的方法:
function replace_product_link( $link_html, $product, $args=null ){
return $link_html;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.